package edu.famework.demo6;

import java.util.HashSet;
import java.util.Set;

public class Test4 {
    public static void main(String[] args) {
        Set<Integer> set = new HashSet<>();
        int[] nums = new int[9];
        for (int i = 0; i < nums.length; i++) {
            if (set.contains(nums[i])) {
                set.remove(nums[i]);
            } else {
                set.add(nums[i]);
            }
        }
        for (int i = 0; i < nums.length; i++) {
            if (set.contains(nums[i])){
                System.out.println(nums[i]);
            }
        }
    }
}
